//# sourceURL=dynamicScript.js
$ ( function () {
    selectrwres()
})

function selectrwres() {
    $("#tabscx").bootstrapTable({
        //请求方式  get请求中文会乱码，建议使用post请求
        method: 'post',
        //请求头部的设置
        contentType: 'application/json',
        //url
        url: '/selectrwres',
        //设置交替行样式
        striped: true,
        //初始显示页号
        pageNumber: 1,
        //设置表格高度
        //height: 350,
        //是否显示分页
        pagination: true,
        //设置是服务端分页还是客户端分页
        sidePagination: 'server',
        //页大小
        pageSize: 3,
        //分页列表
        pageList: [3, 5, 6, 10],
        //上传到服务端的参数
        queryParams:function (parms) {
            return{
                num:(parms.offset/parms.limit)+1,
                size:parms.limit,
            }
        },
        //定义列名
        columns:[
            {title:"入库单编号",field:"payid",align:"center"},
            {title:"入库理由",field:"reason",align:"center"},
            {title:"完成时间",field:"examinetime",align:"center",
                formatter:function (vale,row,index) {
                    let del_btn=row.examinetime=null?"未完成":row.examinetime;
                    return del_btn;
                }},
            {title:"应入库总件数",field:"amountsum",align:"center"},
            {title:"已入库总件数",field:"paidamountsum",align:"center"},
            {title:"入库单状态",field:"registertag",align:"center",
                formatter:function (vale,row,index) {
                    let del_btn=row.registertag=="R001-0"?"等待":row.registertag=="R001-1"?"执行":"完成";
                    return del_btn;
                }},
        ]
    })
}